
package ws.tracking;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for vehicle complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="vehicle">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="capacity" type="{http://www.w3.org/2001/XMLSchema}double"/>
 *         &lt;element name="currentRoute" type="{http://tracking.ws/}stop" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "vehicle", propOrder = {
    "capacity",
    "currentRoute",
    "id"
})
public class Vehicle {

    /**
     *
     */
    protected double capacity;
    /**
     *
     */
    @XmlElement(nillable = true)
    protected List<Stop> currentRoute;
    /**
     *
     */
    protected int id;

    /**
     * Gets the value of the capacity property.
     * 
     * @return
     */
    public double getCapacity() {
        return capacity;
    }

    /**
     * Sets the value of the capacity property.
     * 
     * @param value
     */
    public void setCapacity(double value) {
        this.capacity = value;
    }

    /**
     * Gets the value of the currentRoute property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the currentRoute property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getCurrentRoute().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link Stop }
     * 
     * 
     * @return
     */
    public List<Stop> getCurrentRoute() {
        if (currentRoute == null) {
            currentRoute = new ArrayList<Stop>();
        }
        return this.currentRoute;
    }

    /**
     * Gets the value of the id property.
     * 
     * @return
     */
    public int getId() {
        return id;
    }

    /**
     * Sets the value of the id property.
     * 
     * @param value
     */
    public void setId(int value) {
        this.id = value;
    }

}
